#pragma once
#include <string>
#include <vector>

class Client;
class Monitor;
struct Recordable;

class App {
public:
	App();
	Recordable* get_recordable_window(int index);
	~App();
private:
	Client* m_server = nullptr;

	// other
	std::vector<Recordable*>* m_recordable_window_v = nullptr;
	std::vector<Monitor*>* m_monitor_v = nullptr;
private:
	// server
	void start_server();
	void stop_server();

	

	// other
	void get_all_window();
	void get_all_monitor();

	// init

	// clear
	void clear_recordable_window();
	void clear_monitor();
private:
	// callback

	// server
	bool on_message(unsigned int _conv, char* _key, char* _payload, char* _res_key, char* _response);
	bool on_connected(unsigned int conv);
	bool on_closed(unsigned int conv);

	// enumWindow
	void find_all_recordable_window_callback(Recordable* _recordable);
};